package com.sihan.framework.etm.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 响应地图对象
 */
@Data
public class AtlasAnswerDTO implements Serializable,Comparable<AtlasAnswerDTO> {

    private static final long serialVersionUID = -7258183810025800431L;

    private String id;
    private String taskName;

    private String lng;

    private String lat;

    //private Boolean isTicket;

    @ApiModelProperty("设备id")
    private String deviceId;
    @ApiModelProperty("设备名")
    private String deviceName;
    @ApiModelProperty("设备编号")
    private String groundingWireNum;
    @ApiModelProperty("类型id")
    private String typeId;
    @ApiModelProperty("名")
    private String typeName;

    private String hitchABC;

    private String hitchA;

    private String hitchB;

    private String hitchC;
    @ApiModelProperty("接地状态")
    private String mountGround;

    @ApiModelProperty("接地状态集合")
    private String groundList;

    @ApiModelProperty("挂接项状态集合")
    private List hitch;

    @ApiModelProperty("挂起时间")
    private Date suspendTime;

    private String hitchD;
    @ApiModelProperty("高度")
    private String height;
    @ApiModelProperty("电量")
    private String electricQuantity;
    @ApiModelProperty("电压")
    private BigDecimal voltage;
    @ApiModelProperty("状态")
    private String mountTypeS;

    @ApiModelProperty("状态")
    private Integer state;
    @ApiModelProperty("工作状态")
    private Integer mountState;

    @ApiModelProperty("工作票号")
    private String ticket;
    /**
     * 杆塔号
     */
    @ApiModelProperty("杆塔号")
    private String towerCode;
    /**
     * 线路号
     */
    @ApiModelProperty("线路号")
    private String routeCode;
    /**
     * 线路名
     */
    @ApiModelProperty("线路名")
    private String routeName;
    /**
     * 单位id
     */
    @ApiModelProperty("单位id")
    private String org;
    /**
     * 单位名
     */
    @ApiModelProperty("单位名")
    private String orgName;
    /**
     * 负责人
     */
    @ApiModelProperty("负责人")
    private String principalName;
    /**
     * 负责人电话
     */
    @ApiModelProperty("负责人电话")
    private String principalPhone;
    /**
     * 任务描述
     */
    @ApiModelProperty("任务描述")
    private String task;

    @ApiModelProperty("异常类型")
    private String abnormalType;

    @ApiModelProperty("接地状态")
    private String groundType;

    private Boolean showFlag = false;
//    @Override
//    public int compareTo(AtlasAnswerDTO dto){
//        if(this.state == 0){
//            if (dto.getState() != 1){
//                return 0;
//            }else {
//                return 1;
//            }
//        }else if (this.state == 1){
//            if (dto.getState() == 1){
//                return 0;
//            }else {
//                return -1;
//            }
//        }else {
//            if (dto.getState() == 1){
//                return 1;
//            }else {
//                return 0;
//            }
//        }
//
//    }

        @Override
    public int compareTo(AtlasAnswerDTO dto){
            return this.state - dto.getState();
        }

}
